home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / MEDICAL / 1752.ZIP / MHD.ZIP / MHSRORGN.PRG < prev    next >
Text File  |  1986-07-08  |  5KB  |  142 lines

  1. * MHSRORGN   DB3 PLUS                               REVISION 03/06/86
  2. *    
  3. * Search for susceptible organism
  4. *
  5. CLOSE DATABASES
  6. choice2 = 0
  7. repeat = .T.
  8. DELETE FILE MHWORK1.DBF
  9. USE MHWORK
  10. COPY STRUCTURE TO MHWORK1
  11. STORE 'organism' TO field
  12. DO WHILE repeat
  13.    CLEAR
  14.    ? 'MENU TO SELECT ANTIMICROBIAL DRUG ACCORDING TO SUSCEPTIBLE ORGANISM'
  15.    ?
  16.    ? 'You may search by classification or specific organism'
  17.    ? '   1. free-form search            16. Listeria'
  18.    ? '   2. anaerobes                   17. Morganella'
  19.    ? '   3. Acinetobacter               18. Mycoplasma'
  20.    ? '   4. Actinomyces                 19. Neisseria gonorrhea'
  21.    ? '   5. Bacteroides                 20. Peptococcus'
  22.    ? '   6. Candida                     21. Peptostreptococcus'
  23.    ? '   7. Chlamydia                   22. Proteus'
  24.    ? '   8. Clostridium                 23. Providencia'
  25.    ? '   9. Enterobacter                24. Pseudomonas'
  26.    ? '  10. Enterococcus                25. Serratia'
  27.    ? '  11. Escherichia coli            26  Staphylococcus'
  28.    ? '  12. Gardnerella                 27. Streptococcus'
  29.    ? '  13. Herpes                      28. Treponema pallidum'
  30.    ? '  14. Haemophilus ducreyi         29. Trichomonas'
  31.    ? '  15. Klebsiella'             
  32.    ?
  33.    ACCEPT 'Enter the number of your choice: ' TO choice
  34.    STORE VAL(choice) TO choice2
  35.    IF choice2 >= 1 .AND. choice2 <= 29
  36.       repeat = .F.
  37.    ENDIF choice2 >= 1 and <= 29
  38. ENDDO WHILE repeat
  39. DO CASE
  40.    CASE choice2 = 1
  41.       ? 'You may enter a search string using dBASE II conventions,'
  42.       ? 'with each term enclosed in single quotes followed by $organism'
  43.       ACCEPT 'Enter string: ' TO search 
  44.    CASE choice2 = 2
  45.       STORE 'anaerobes' TO search
  46.    CASE choice2 = 3
  47.       STORE 'Acinetobacter' TO search
  48.    CASE choice2 = 4
  49.       STORE 'Actinomyces' TO search 
  50.    CASE choice2 = 5
  51.       STORE 'Bacteroides' TO search
  52.    CASE choice2 = 6
  53.       STORE 'Candida' TO search 
  54.    CASE choice2 = 7
  55.       STORE 'Chlamydia' TO searchè   CASE choice2 = 8
  56.       STORE 'Clostridium' TO search
  57.    CASE choice2 = 9
  58.       STORE 'Enterobacter' TO search 
  59.    CASE choice2 = 10
  60.       STORE 'Enterococcus' TO search
  61.    CASE choice2 = 11
  62.       STORE 'Escherichia coli' TO search
  63.    CASE choice2 = 12
  64.       STORE 'Gardnerella' TO search
  65.    CASE choice2 = 13
  66.       STORE 'Herpes' TO search
  67.    CASE choice2 = 14
  68.       STORE 'Haemophilus ducreyi' TO search
  69.    CASE choice2 = 15
  70.       STORE 'Klebsiella' TO search 
  71.    CASE choice2 = 16
  72.       STORE 'Listeria' TO search
  73.    CASE choice2 = 17
  74.       STORE 'Morganella' TO search
  75.    CASE choice2 = 18
  76.       STORE 'Mycoplasma' TO search 
  77.    CASE choice2 = 19
  78.       STORE 'Neisseria gonorrhea' TO search
  79.    CASE choice2 = 20
  80.       STORE 'Peptococcus' TO search 
  81.    CASE choice2 = 21
  82.       STORE 'Peptostreptoccus' TO search
  83.    CASE choice2 = 22
  84.       STORE 'Proteus' TO search 
  85.    CASE choice2 = 23
  86.       STORE 'Providencia' TO search
  87.    CASE choice2 = 24
  88.       STORE 'Pseudomonas' TO search 
  89.    CASE choice2 = 25
  90.       STORE 'Serratia' TO search
  91.    CASE choice2 = 26
  92.       STORE 'Staphylococcus' TO search
  93.    CASE choice2 = 27
  94.       STORE 'Streptococcus' TO search 
  95.    CASE choice2 = 28
  96.       STORE 'Treponema pallidum' TO search
  97.    CASE choice2 = 29
  98.       STORE 'Trichomonas' TO search
  99. ENDCASE
  100. ? 'Searching database for antimicrobials effective against: ' 
  101. IF search2
  102.    ? combsrch + ' and '+ search
  103. ENDIF search2
  104. IF .NOT. search2
  105.    ? search
  106. ENDIF NOT search2
  107. * Select data and store in MHWORK1.DBF or MHWORK2.DBF
  108. SELECT B
  109. USE MHWORK1
  110. SELECT A
  111. USE &datafile
  112. * Match free form search string with data in fieldèIF STR(choice2,1) = '1'
  113.    DO WHILE .NOT. EOF()
  114.       IF &search
  115.          STORE DRUG_ID TO mdrug_id
  116.          * Store matching drug:id in temporary WORK1
  117.          SELECT MHWORK1
  118.          APPEND BLANK
  119.          REPLACE DRUG_ID WITH mdrug_id
  120.          SELECT &datafile
  121.       ENDIF &search
  122.       SKIP
  123.    ENDDO WHILE NOT EOF
  124. ENDIF STR(choice2,1) = '1'
  125. * Match menu-chosen search string with data in field 
  126. IF STR(choice2,1) <> '1' 
  127.    DO WHILE .NOT. EOF()
  128.       IF '&search' $&field
  129.          STORE DRUG_ID TO mdrug_id
  130.          * Store matching drug:id in temporary WORK1 
  131.          SELECT MHWORK1
  132.          APPEND BLANK
  133.          REPLACE DRUG_ID WITH mdrug_id
  134.          SELECT &datafile
  135.       ENDIF '&search' $&field
  136.       SKIP
  137.    ENDDO WHILE NOT EOF
  138. ENDIF STR(choice2,1) <> '1' 
  139. choice = '1'
  140. repeat = .T.
  141. RETURN
  142.